Fix close timer randomly kicking in
authorjustbur <justin@burkett.cc>
Thu, 2 Jul 2015 23:28:36 +0000 (19:28 -0400)
committerjustbur <justin@burkett.cc>
Thu, 2 Jul 2015 23:31:33 +0000 (19:31 -0400)
when you take too long to decide

which-key.el

index d00f3c5421a3dcb2563e65f4b531433d82ec5561..968bcbce25246330b166507f9fcc54b53106637f 100644 (file)
@@ -130,6 +130,8 @@ Finally, show the buffer."
   (let ((key (this-single-command-keys)))
     (if (> (length key) 0)
         (progn
+          (when which-key--close-timer (cancel-timer which-key--close-timer))
+          (which-key/hide-buffer)
           (let ((buf (current-buffer))
                 (key-str-qt (regexp-quote (key-description key)))
                 (bottom-or-top (member which-key-buffer-position '(top bottom)))